import { createBrowserRouter, Navigate } from 'react-router-dom'

import App from '../App'
import Login from '../pages/Login/Login'
import Home from '../pages/Home/Home'
import Unused from '../pages/Unused/Unused'
import Cart from '../pages/Cart/Cart'
import Mine from '../pages/Mine/Mine'


const router = createBrowserRouter([
    {
        path: '/',
        element: <App />,
        children:[
            {
                path: 'login',
                element: <Login />
            },
            {
                path: 'home',
                element: <Home />
            },
            {
                path: 'unused',
                element: <Unused />
            },
            {
                path: 'cart',
                element: <Cart />
            },
            {
                path:'mine',
                element: <Mine />
            },
            {
                path: '/',
                element: <Navigate to="/home"/>
            }
        ]
    }
])

export default router